package com.guandi.geekbrowser.primary.service;

import com.guandi.geekbrowser.primary.entity.TaskItem;
import org.springframework.data.domain.Page;

import java.util.List;

public interface TaskItemService {
    void save(TaskItem taskItem);

    List<TaskItem> findAllByUserIdAndType(String userId, Integer type);

    Integer updateLikedNotesByIdAndUserId(String notes, Long id, String userId);

    Integer updateLikedByIdAndUserId(String url,String asinCode,Integer totalCount,Long id, String userId);

    Integer deleteByIdAndUserId(Long id, String userId);

    void saveAll(List<TaskItem> taskItems);

    List<TaskItem> findAllByUserIdAndTypeAndTaskName(String userId, Integer type, String taskName);

    Page<TaskItem> findAllByUserIdAndTypeAndTaskNamePage(String userId, Integer type, String taskName, Integer pageNumber, Integer pageSize);

    List<TaskItem> findAllByUserIdAndTypeAndTaskNameAndFinish(String userId, Integer type, String taskName,Boolean finish);

    List<TaskItem> findAllByUserIdAndTypeAndTaskNameAndFinishAndCountry(String userId, Integer type, String taskName,Boolean finish,String country);

    TaskItem findAllByUserIdAndTypeAndId(String userId, Integer type,Long id);

}
